package com.aiden.cashbook.utils

import android.content.Context
import java.io.BufferedReader
import java.io.InputStreamReader

object JsonUtils {

    fun openFile(context: Context, filename: String): String {
        val stringBuilder = StringBuilder()

        val bufferReader = BufferedReader(InputStreamReader(context.assets.open(filename)))
        val lines = bufferReader.readLines()
        for (line in lines) {
            stringBuilder.append(line)
        }

        return stringBuilder.toString()
    }
}